include_once('__config.php');
if(!isset($_GET['id_prod']))
{
header("Location: products.php");
}
$id_prod = $_GET['id_prod'];
include("includes/header.php");
?>
// TOP MENU ?>
include_once('includes/top_menu.php');
?>
// CENTER ?>
$sql = "SELECT * FROM pet_prodotti WHERE id='".mysql_parse($id_prod)."'";
$res = $db->fetchAssoc($sql);
$prod = $res[0];
$dir = "images/prodotti/screens/".$id_prod."/";
// Open a known directory, and proceed to read its contents
$images = array();
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false)
{
if($file!="." && $file!=".." && is_file($dir.$file))
{
$images[] = $file;
}
}
closedir($dh);
}
}
?>
|
if(count($images)>0) { ?>
foreach($images as $key => $v)
{
if($key>0 && $key<=4)
{
?>
|
}
}
?>
|
foreach($images as $key => $v)
{
if($key>4)
{
?>
}
}
?>
|
|
} ?>
|
$sql = "SELECT * FROM pet_prodotti WHERE id_category='".mysql_parse($prod['id_category'])."' AND id!='".mysql_parse($prod['id'])."' ORDER BY RAND() LIMIT 0,4";
$res = $db->fetchAssoc($sql);
if(count($res)>0)
{
?>
Potresti essere interessato a:
foreach($res as $key => $v)
{
if(($key%2)==0)
{
?>
}
?>
|
if(($key%2)==1)
{
?>
}
}
?>
} ?>
|
" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true" data-font="verdana"> |
Descrizione Prodotto: |
=$prod['long_text']?> |
// CUSTOM LEGAL_LINE SPACE ?>
/*
*/ ?>
// LEGAL LINE ?>
include('includes/legal_line.php');
?>
// LEGAL LINE ?>
/*
include('includes/legal_line.php');
?>
*/ ?>